package com.Apo1o.service.Impl;

import com.Apo1o.bean.ext.ManagerAnimalExt;
import com.Apo1o.dao.Ext.AnimalExtMapper;
import com.Apo1o.service.IAnimalService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @Auther: Apo1o.
 * @Date: 2023/11/2-11-02-22:06
 * @Description： com.Apo1o.service.Impl
 */
@Service
@RequiredArgsConstructor
public class AnimalServiceImpl implements IAnimalService {
    private final AnimalExtMapper animalExtMapper;
    @Override
    public PageInfo<ManagerAnimalExt> findAll(Integer pageNum, Integer pageSize, String aGender, String aHealthy) {
        PageHelper.startPage(pageNum,pageSize);
        PageInfo<ManagerAnimalExt> page = new PageInfo<>(animalExtMapper.findAll(aGender,aHealthy));

        return page;
    }
}
